from kcp import KCPClientSync
import time

client = KCPClientSync(
    "liuchenxi.love",
    5100,
    conv_id=1,
)


@client.on_data
def handle_data(data: bytes) -> None:
    print(data)


@client.on_start
def on_start() -> None:
    print("Connected to server!")
    while True:
        client.send(b"Data!")
        time.sleep(1)



client.start()